// use web_sys::wasm_bindgen::{closure::Closure, JsCast};

use crate::win::with_wins;

pub struct AppProxy();
impl types::AppProxy for AppProxy {
	fn wake(&self, id: i64) {
		// web_sys::window().map(|win| {
			// win.set_timeout_with_callback(
			// 	Closure::once_into_js(move || {
					with_wins(|wins| {
						for (_, win) in wins.iter() {
							win.rep().on_proxy(win.win_ref(), id)
						}
					})
				// })
				// .unchecked_ref(),
			// )
		// });
	}
}
